import router from '@/router';
import { PageEnum } from '@/enums/pageEnum';
import { removeToken } from '@/utils/token';

/**
 * 跳转到登录页
 */
export function toLogin() {
	removeToken();
	router.replace({
		path: PageEnum.BASE_LOGIN,
		query: { ...router.currentRoute.value.query, redirect: router.currentRoute.value.path },
	});
}
